/**
 * 模态框
 */
module.exports = function($scope, $state, $stateParams, $modalInstance, items, $resource,$modal){

    $scope.wjq=0;
    if(items.pay_state_name=='已支付' && items.upplier_check_state_name=='已审核' && items.order_state_name=='开心出游'){
        $scope.wjq=1;
    }
    $resource('/api/ac/lc/lineStatisticsListService/findOrderInfo', {}, {}).
			get({order_code : items.order_code,product_id : items.product_id}, function(res){
				// console.log('购买须知');
                // console.log('下面是res');
                // console.log(res);
                // console.log('上面是res');
                if(res.errcode === 0 || res.errcode === 10003){
					$scope.obj=res.data;
                    console.log($scope.obj);
                    $scope.touristList=res.data.touristList;
                    $scope.touristList2=[];
                    for(var z=0;z<$scope.touristList.length;z++){
                        if($scope.touristList[z].lot_name!=null&&$scope.touristList[z].lot_name!=undefined&&$scope.touristList[z].lot_name!=''){
                            $scope.touristList2.push($scope.touristList[z]);
                        }
                    }
                }else{
                    alert(res.errmsg);
                }
            });
            $scope.cancel = function () {  
                $modalInstance.dismiss('cancel'); 
            };
    // $scope.obj = items;
};
